|
|
 |
|
|
|
|
33: Public Function getRegSetting(argAppName As String, _
34: argSection As String, argKey As String, Optional argDefault)
35: On Error GoTo getRegSettingErr
36: m_returns = Switch(argAppName = , True, argSection = , True)
37: If m_returns Then
38: 'You need values
39: MsgBox "Please enter both the Application Name and the Section"
40: Exit Function
41: End If
42: If IsMissing(argDefault) Then
43: m_pCurrentKey = GetSetting(AppName:=argAppName,
section:=argSection, _
44: Key:=argKey)
45: Else
46: m_pCurrentKey = GetSetting(AppName:=argAppName,
section:=argSection, _
47: Key:=argKey, Default:=argDefault)
48: End If
49:
50: If argAppName <> And argSection <> And argKey <> Then
51: 'Send defaults from last save
52: If Not IsMissing(argDefault) Then
53: m_pCurrentKey = GetSetting(AppName:=m_pLastAppName,
section:=m_pLastSection, _
54: Key:=argKey, Default:=argDefault)
55: Else
56: m_pCurrentKey = GetSetting(AppName:=m_pLastAppName,
section:=m_pLastSection, _
57: Key:=argKey, Default:=argDefault)
58: End If
59: End If
60: getRegSetting = m_pCurrentKey
61: Exit Function
62: getRegSettingErr:
63: Err.Raise vbError + 1002, CRegistry,
Please enter both the Application Name and the Section
64:
65: End Function
66: Public Function getAllRegSettings(argAppName As String, _
67: argSection As String, Optional ByRef argListViewObj)
68: 'Dim localRegSettings(0, 0)
69: Dim cnt As Long, objColHdr As ColumnHeader, objListItem As ListItem
70: Dim localRegSettings As Variant, arrayRef
71: Const SPACING As Byte = 30
72: On Error GoTo getAllRegSettingsErr
73: localRegSettings = GetAllSettings(AppName:=argAppName,
section:=argSection)
74: If Not IsArray(localRegSettings) Then Exit Function
|
|
|
|
|
|